Skip to content

Conversation

LingyuCoder
Copy link
Contributor

Summary

Use single test files as jest entries, then these tests can run concurrently by jest workers

Related links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@Copilot Copilot AI review requested due to automatic review settings September 24, 2025 09:15
Copy link

netlify bot commented Sep 24, 2025

Deploy Preview for rspack ready!

Name Link
🔨 Latest commit 60a7b12
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/68d662c813aa8b0008c2140c
😎 Deploy Preview https://deploy-preview-11755--rspack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the test structure for rspack-test to use single test files as jest entries, enabling concurrent test execution through Jest workers.

  • Replaces legacy test runners with global helper functions for case definitions
  • Converts test configuration from module.exports to function-based definitions
  • Updates Jest configuration to match individual test files instead of suite-level runners

Reviewed Changes

Copilot reviewed 132 out of 132 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/rspack-test/jest.config.js Updates test patterns to include individual case files and adds setup script
packages/rspack-test-tools/src/setup.ts Adds global helper functions for test case definition
packages/rspack-test-tools/src/case/*.ts Refactors case creators to use BasicCaseCreator pattern
tests/rspack-test/Cases/.js Converts from module.exports to defineXXXCase function calls
tests/rspack-test/*.test.js Removes legacy test suite files

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

github-actions bot commented Sep 24, 2025

📦 Binary Size-limit

Comparing 60a7b12 to feat: transform url in new URL without runtime (#11765) by Fy

🙈 Size remains the same at 47.43MB

Copy link

codspeed-hq bot commented Sep 24, 2025

CodSpeed Performance Report

Merging #11755 will not alter performance

Comparing test/single-file-test (60a7b12) with main (617fe7a)

🎉 Hooray! codspeed-node just leveled up to 4.0.1!

A heads-up, this is a breaking change and it might affect your current performance baseline a bit. But here's the exciting part - it's packed with new, cool features and promises improved result stability 🥳!
Curious about what's new? Visit our releases page to delve into all the awesome details about this new version.

Summary

✅ 17 untouched

"test:diff": "pnpm --filter \"@rspack/*\" test:diff",
"test:hot": "pnpm --filter \"@rspack/*\" test:hot",
"test:unit": "pnpm --parallel --filter \"@rspack/*\" test",
"test:unit": "pnpm --sequential --filter \"@rspack/*\" test",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use sequential to prevent OOM

target: aarch64-apple-darwin
profile: "ci"
runner: ${{ vars.MACOS_RUNNER_LABELS || '"macos-latest"' }}
runner: ${{ vars.MAC_SELF_HOSTED_RUNNER_LABELS || '"macos-latest"' }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use self hosted mac runner to prevent timeout

@LingyuCoder LingyuCoder force-pushed the test/single-file-test branch 2 times, most recently from e2a21e4 to 60a7b12 Compare September 26, 2025 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants